gusucode.com > 耐品图片管理系统 标准版A > 耐品图片管理系统 标准版A/Comment.asp
<!--#include file="Head.asp"--> <% '=============================================================== ' 著作权号:中国国家版权局著作权登记号2004SR07385 ' 版权所有:深圳市耐品科技开发有限公司 www.naipin.com ' 联系电话:0755-26611119 81234844 81234845 ' 联系手机:13316911914 ' 联系邮箱:naipin@naipin.com '=============================================================== Dim rs Action = Request.QueryString("Action") With Netout .Load("Image") ID = .CheckStr(Request.QueryString("ID"),0) Show = Request.QueryString("show") If Show<>"1" And Netout.GetCookie("Vote")<>"1" Then Response.Write("<script>alert('没有权限!');window.close();</script>") Response.End() End If If Action = "Mark" Then MarkMan=Netout.HtmlEncode(Trim(Request.Form("MarkMan")),True) MarkDesc=Netout.HtmlCode(Request.Form("Content"),True) On Error Resume Next Conn.Execute("insert into Nt_remark(ImageId,MarkMan,MarkDesc,MarkTime) values("&ID&",'"&MarkMan&"','"&Left(MarkDesc,255)&"',"&DateString(0)&")") If Err Then Response.Write("<script>alert('发表评论失败!');window.close();</script>") Else Response.Write("<script>alert('成功发表评论!');window.close();</script>") End If Response.End() End If If show="1" Then CurrentPage = Cint(.CheckStr(request.QueryString("page"),1)) strFileName="Comment.asp?ID="&ID&"&show="&Show&"&" sql="select * from NT_Remark where ImageId="&ID&" order by MarkTime desc" .MaxPerPage = 10 .TopPage = False .BottomPage = True .SqlRecord = sql .InitText = "篇评论" .strFileName = strFileName MyHtml = .ShowRecord(CurrentPage) MyHtml = "<table align=center border=""0"" cellpadding=""0"" cellspacing=""0"" width=""765"" class='image_p_comment'>"&_ "<tr><td style='padding: 5px'><table align=center border=""0"" cellpadding=""3"" cellspacing=""1"" width=""700"" class='tableBorder'>"&_ "<tr class='tableHeader'><td>以下是关于图片编号为 1"&String(7-len(ID),"0")&ID&" 的评论:</td></tr></table></td></tr>"&_ "<tr><td><table align=center border=""0"" cellpadding=""3"" cellspacing=""1"" width=""700"" class='tableBorder'>"&_ "<tr class='tableHeader'><td width=100>呢称</td><td>评论内容</td><td width=160>评论时间</td></tr>"&MyHtml&"</table></td></tr>"&_ "<tr><td> </td></tr></table>" Else MyHtml = Split(.vCache,"@@")(4) MyHtml = Replace(Replace(MyHtml,"100%",420),"Image.asp","comment.asp") MyHtml = Replace(Replace(MyHtml,"titleID","ID"),"{?ID}",ID) MyHtml = Replace(MyHtml,"{?UserName}",.UserName) If Netout.UserName<>"" Then MyHtml = replace(MyHtml,"{?readonly}","readonly") Else MyHtml = replace(MyHtml,"{?readonly}","") End If End If MyHtml = "<link type=""text/css"" rel=""stylesheet"" href=""Face/"&.CssFileName&".css"">"&_ "<title>评论图片</title><body style='border: 0px;margin-top: 10px'>"&MyHtml Response.Write MyHtml End With Function ShowContent(MaxPerPage) dim Html i=0:do while not rs.eof and i<MaxPerPage Html = Html&"<tr class='tableBack'><td>"&rs("MarkMan")&"</td><td>"&rs("MarkDesc")&"</td><td>"&rs("MarkTime")&"</td></tr>" rs.movenext:i = i + 1 loop ShowContent = Html End Function %>